<?php

namespace App\Http\Controllers\Buy;

use Illuminate\Http\Request;
use Config;

use App\Http\Service\Product\ProductService;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class BuyController extends Controller
{
    protected  $index = 'Buy.index';

    /**
     * @return $this
     *   购买视图
     */
    public function index()
    {
        $product = new ProductService();

        $ret = $product->Product();

        if($ret['code'] == 0)
        {
            $data = $ret['data'];
        }else{
            $data = [];
        }
        $title="购买";
        return view($this->index)->with('data',$data)->with('title',$title);
    }
}
